<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head th:replace="index::head"></head>
<style>
    form>span{
        display: inline-block;
        width: 380px;
        color: red;
        text-indent: 100px;
        margin-top: -10px;
    }
    form>label{
        display: inline-block;
        width: 100px;
    }
</style>

<body>
<div class="bodymain">

    <div th:replace="index::.layui-header"></div>
    <div th:replace="index::.main-nav"></div>

    <link rel="stylesheet" type="text/css" href="bbs/images/css.css">
    <div class="layui-main">
        <div style="clear:both">
        </div>
        <div style="height:30px; display:block; clear:both"></div>
        <div class="layui-box fdc-body">
            <!-- thymeleaf 表达 : ${变量表达式 ==> SPEL( SpringEL) ==> OGNL表达式}
                    可以执行java静态方法 T(静态类类路径).方法名(...)
            -->
            <div style="width: 500px; margin: auto">
                <form action="login" method="post" style="line-height: 30px">
                    <span th:text="${T(com.example.springboot.util.Utils).getErrors(errors,'NameOrPwdError')}"></span><br>
                    <label>账号:</label><input name="name" th:value="${param.name}"><br>
                    <span th:text="${T(com.example.springboot.util.Utils).getErrors(errors,'name')}"></span><br>
                    <label>密码:</label><input name="pwd" th:value="${param.pwd}"><br>
                    <span th:text="${T(com.example.springboot.util.Utils).getErrors(errors,'pwd')}"></span><br>
                    <div style="text-align: center">
                        <button>登录</button>
                        <button formaction="toreg">注册</button>
                        <a href="toforget1">忘记密码</a>
                    </div>
                </form>
            </div>
        </div>
        <div class="line_10"></div>
    </div>

    <!-- 引入页脚-->
    <div th:replace="index::.footer"></div>
</div>
</body>
</html>